<?php
function __autoload($str){
	$path=strtolower($str);
	$path=str_replace("_","/",$path);
	$path=str_replace("model","models",$path);
	$path=str_replace("helper","helpers",$path);
	require("../$path.php");
}

function loadview($str,$data=""){
	require("../views/$str.php");
}

function redirect($url){
	header("location:$url");
	exit();
}